<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>评价界面</title>
    <!-- 引入favicon图标 -->
    <!-- <link rel="shortcut icon" href="favicon.ico"> -->
    <!-- 初始化样式 -->
    <!-- <link rel="stylesheet" href="css/base.css"> -->
    <!-- 引入注册 页面less -->
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/pjq.css">
    <link rel="stylesheet" href="./iconfont/iconfont.css">
</head>

<body>
    <div id="pjq">
        <div id="header">
            <div class="header-left">
                <img class="img1" src="./images/logo.png" alt="">
                <span class="header-title">国家税务局XXXXXX<button style="width:50px;height:50px"
                        onclick="tcFn()">弹窗</button><button style="width:50px;height:50px"
                        onclick="pjFn()">去评价</button>
                        <button style="width:100px;height:50px"
                        onclick="imgExistFn()">图片检测</button>
                    </span>
            </div>
            <div class="header-right">
                <div class="time1" id="time"></div>
                <div class="time-content">
                    <span class="date" id="date1"></span>
                    <span class="date">|</span>
                    <span class="date" id="date2"></span>
                </div>
            </div>
        </div>
        <div class="pjq-content">
            <!-- 左边 -->
            <div class="content-left">
                <div class="people">
                    <img id="image" src="./images/touxiang.png" alt="" />
                    <div>
                        <div class="name">王明明</div>
                        <div class="gh">工号：54501030031</div>
                        <div class="xjfw">
                            星级服务：<span class="iconfont icon-pingjia"></span>
                            <span class="iconfont icon-pingjia"></span>
                            <span class="iconfont icon-pingjia"></span>
                            <span class="iconfont icon-pingjia"></span>
                            <span class="iconfont icon-pingjia"></span>
                        </div>
                    </div>
                </div>
                <div class="bottom">当前窗口人员信息</div>
            </div>
            <div class="content-right">
                <!-- <div class="yw">
                    <div class="ph">A120</div>
                    <div class="yw-name">发票业务</div>
                </div> -->
                <span class="dhj">待呼叫</span>
                <div class="bottom">当前票号</div>
            </div>
        </div>
    </div>
    <script>
        function showTime() {
            var date = new Date();
            var year = date.getFullYear();
            var month = date.getMonth() + 1;  //因为month属性从0开始所以加1
            var day = date.getDate();   // 日
            var week = date.getDay();  // 星期几，是个数字
            var hour = date.getHours();
            var minute = date.getMinutes();
            var second = date.getSeconds();
            hour = hour < 10 ? "0" + hour : hour;
            minute = minute < 10 ? "0" + minute : minute;
            second = second < 10 ? "0" + second : second;
            var time = hour + ":" + minute + ":" + second
            var date = year + "-" + month + "-" + day
            switch (week) {
                case 1: week = "星期一"; break;
                case 2: week = "星期二"; break;
                case 3: week = "星期三"; break;
                case 4: week = "星期四"; break;
                case 5: week = "星期五"; break;
                case 6: week = "星期六"; break;
                case 0: week = "星期日"; break;
            }
            document.getElementById("time").innerHTML = time;
            document.getElementById("date1").innerHTML = date;
            document.getElementById("date2").innerHTML = week;
        }

        setInterval("showTime()", 1000);//每隔1000毫秒（即1秒）显示一次当前时间

        function tcFn() {
            var localstroage = window.localStorage;
            localStorage.setItem('sjjgmc', '国家税务总局青秀区税务局');
            localStorage.setItem('ygmc', '小明');
            // s=localStorage.getItem('sjjgmc');
            console.log(localstroage);
            alert('localstorage信息：  ' + JSON.stringify(localstroage))
        }
        function pjFn() {//页面跳转
            window.location.href = "./hcp.html"
        }
        // 检查真人图片是否存在的函数
        function imgExistFn() {
            // 图片路径
            var imagePath = './images/tc.jpg';
            var img = new Image();
            img.onload = function () {
                // 如果图片存在，则显示该图片
                document.getElementById('image').src = imagePath;
            };
            img.onerror = function () {
                // 如果图片不存在，则显示默认图片
                document.getElementById('image').src = './images/touxiang.png';
            };
            img.src = imagePath;
        }

    </script>
</body>

</html>